<%--
  Created by IntelliJ IDEA.
  User: LWL
  Date: 2020/5/4
  Time: 15:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Title</title>
    <link rel="stylesheet" href="../static/bootstrap/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="../static/css/base.css"/>
    <link rel="stylesheet" href="../static/css/userinfo.css"/>
</head>
<body>
<div class="container head">
        <nav class="navbar navbar-default" role="navigation" style="color: rgba(122,45,49,0.61)">
            <div class="container-fluid">
                <div class="navbar-header">
                    <a class="navbar-brand" href="#">个人中心</a>
                </div>
                <div>
                    <ul class="nav navbar-nav navbar-right">
                        <li><a>你好，${user.userName}</a></li>
                        <li><a href="/logout">登出</a></li>

                    </ul>
                </div>
            </div>
        </nav>
</div>

<div class="container body">
        <div class="col-md-2 left">
            <ul class="navTools menu1">
                <li>
                    <div class="menuLi indexLink">
                        <span class="t1 toolLink">
                            <a href="/user/getbaseinfo" target="rightiframe" style="color: deepskyblue">基本信息</a>
                        </span>
                    </div>
                </li>
                <li>
                    <div class="menuLi indexLink">
                        <span class="t2 toolLink">
                            <a href="/user/getmemberinfo" target="rightiframe" style="color: yellowgreen">订单中心</a>
                        </span>
                    </div>
                </li>
                <li>
                    <div class="menuLi indexLink">
                        <span class="t3 toolLink">
                            <a href="/user/managepassword" target="rightiframe" style="color: indianred">修改密码</a>
                        </span>
                    </div>
                </li>
                <li>
                    <div class="menuLi indexLink">
                        <span class="t4 toolLink">
                            <a href="/user/getlogmessage?maxCount=6&maxPage=2&nowPage=1" target="rightiframe" style="color: mediumpurple" >日志消息</a>
                        </span>
                    </div>
                </li>
                <li>
                    <div class="menuLi indexLink">
                        <span class="t4 toolLink">
                            <a target="rightiframe" style="color:black;cursor: pointer" id="t1">酒店浏览</a>
                        </span>
                    </div>
                </li>
            </ul>
        </div>
    <script>

    </script>
        <div class="col-md-10 right">
            <iframe src="/user/getbaseinfo" frameborder="0" id="rightiframe" name="rightiframe"></iframe>
        </div>
</div>


<script src="../static/bootstrap/js/jquery-3.3.1.js"></script>
<script>
</script>
<script>


$(function () {
    $('.indexLink .toolLink').click(function () {
        $('.navTools> li> .menuLi').removeClass('menuActive');
    })
    $('.navTools> li> .menuLi').click(function () {
        if (!$(this).hasClass('menuActive')) {
            $('.navTools> li> .menuLi').removeClass('menuActive');
            $(this).addClass('menuActive');
        } else {
            $(this).removeClass('menuActive');
        }
    })


})
$("#t1").click(function () {
    $.ajax({
        url:"http://localhost:8080/getRecentHtml",
        success:function (data) {
            if(data){
                window.location.href= data;
            }
            else {
                window.location.href="http://localhost:8888/html/index.html"
            }
        }
    })

})
</script>
</body>
</html>
